home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- PRODUCT : Paradox NUMBER : 783
- VERSION : All
- OS : DOS
- DATE : August 26, 1991 PAGE : 1/3
-
- TITLE : What in the World is a Relational Database?
-
-
-
-
- A simple form of database management is called a "flat-file"
- database manager. A flat-file database is a database containing
- all of its information in one table. Let's assume you have a
- database of customers and the orders those customers have placed.
- The table you use would look something like this:
-
- …ÕÕÕÕÕÕÕÕÕÕÕÀÕÕÕÕÕÕÕÕÕÕÕÕÀÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÀÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÀÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ Customer ∫ Address ∫ Telephone # ∫ Part Ordered ∫ Date of Order ∫
- ÃÕÕÕÕÕÕÕÕÕÕÕŒÕÕÕÕÕÕÕÕÕÕÕÕŒÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕŒÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕŒÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕπ
- ∫John Doe ∫123 Main St.∫ (408)555-1212 ∫ Backhoe ∫ 12/25/89 ∫
- ∫Bill Smith ∫456 Elm St. ∫ (408)555-2424 ∫ Vacuum Bottle ∫ 01/04/90 ∫
- ∫John Doe ∫123 Main St.∫ (408)555-1212 ∫ Jigsaw Puzzle ∫ 02/12/90 ∫
- ∫John Doe ∫123 Main St.∫ (408)555-1212 ∫ Brahmin Bull ∫ 02/14/90 ∫
- ∫Bill Smith ∫456 Elm St. ∫ (408)555-2424 ∫ Coffee Maker ∫ 04/17/90 ∫
- ∫Bill Smith ∫123 Main St.∫ (408)555-2424 ∫ Antacid (case)∫ 04/18/90 ∫
- ∫ ∫ ∫ ∫ ∫ ∫
- »ÕÕÕÕÕÕÕÕÕÕÕ ÕÕÕÕÕÕÕÕÕÕÕÕ ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕ ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
- This is certainly more efficient than trying to keep track of all
- your customers on paper. If you wish, you can sort this table by
- customer or by part or by date, which means you can review your
- sales figures rapidly. In many flat-file databases you can
- easily create reports based on your table. Flat-file databases
- managers combine the virtues of power and simplicity. They are
- powerful enough for many business applications, yet simple enough
- that relatively inexperienced computer users can learn them in
- fairly short order.
-
- The drawback of a flat-file database is that information is often
- repeated. In the table above, Bill Smith and John Doe each have
- placed three orders. Instead of letting us enter their name,
- address, and telephone number information once, we must enter ALL
- that information again for EACH order. Not only does this mean
- we have to do a lot of unnecessary work, but it introduces more
- possibilities for error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PRODUCT : Paradox NUMBER : 783
- VERSION : All
- OS : DOS
- DATE : August 26, 1991 PAGE : 2/3
-
- TITLE : What in the World is a Relational Database?
-
-
-
-
- A relational database, on the other hand, is designed to
- circumvent these shortcomings. Relational databases are designed
- to take advantage of the relationships among various groups of
- data. In this case, the relationship between customers and
- orders looks something like this:
-
- ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
- ≥ Bill Smith ≥
- ¿ƒƒƒƒƒƒƒ¬ƒƒƒƒƒƒƒŸ
- ≥ ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
- √ƒƒƒƒƒ¥Vacuum Bottle ≥
- ≥ ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
- ≥ ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
- √ƒƒƒƒƒ¥Coffee Maker ≥
- ≥ ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
- ≥ ⁄ƒƒƒƒƒƒƒƒƒƒƒƒƒƒø
- ¿ƒƒƒƒƒ¥Antacid (case)≥
- ¿ƒƒƒƒƒƒƒƒƒƒƒƒƒƒŸ
-
- This sort of relationship is called a "one-to-many" relationship.
- For every ONE customer, there are (if business is going
- reasonably well) MANY orders. Now a relational database manager
- (such as Borland's Paradox) knows how to capture this relation.
-
- Instead of having ONE table in which all this information is
- contained, the customer-order relation is captured in two tables,
- one of which contains the master information, the other of which
- contains detail information for each master record. The first
- table, also called the "master" table, has all the basic customer
- information:
-
- CUSTOMER ÕÕÕÀÕCustomerÕÕÕÕÀAddressÕÕÕÕÕÕÀÕTelephone #ÕÕÕª
- ∫ Bill Smith ∫456 Elm St. ∫ (408)555-2424 ∫
- ∫ John Doe ∫123 Main St. ∫ (408)555-1212 ∫
-
- You will notice each name appears ONCE in this table; there is no
- duplication of customer records.
-
- The second table, also called a "detail" table, contains the
- order information:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PRODUCT : Paradox NUMBER : 783
- VERSION : All
- OS : DOS
- DATE : August 26, 1991 PAGE : 3/3
-
- TITLE : What in the World is a Relational Database?
-
-
-
-
- ORDERS ÕÕÕÕÀÕCustomerÕÕÕÕÕÀÕPart Ordered ÕÀÕDate of OrderÕÕª
- ∫ Bill Smith ∫ Antacid (case)∫ 04/18/90 ∫
- ∫ Bill Smith ∫ Coffee Maker ∫ 04/17/90 ∫
- ∫ Bill Smith ∫ Vacuum Bottle ∫ 01/04/90 ∫
- ∫ John Doe ∫ Backhoe ∫ 12/25/89 ∫
- ∫ John Doe ∫ Brahmin Bull ∫ 02/14/90 ∫
- ∫ John Doe ∫ Jigsaw Puzzle ∫ 02/12/90 ∫
-
- Here you will see that each item has a separate line. Instead of
- repeating all the information for each customer, only the name
- field (which is the field that "links" these two tables) is
- repeated. This in itself is an advantage; we save a lot of disk
- space, especially as the number of orders per customer increases.
- Often the field that "links" the two tables is a code or id of
- some kind versus a name; this would further save on disk space.
-
- The quick answer is that in a database like Paradox, there is
- seldom need to enter information twice. You can, with very
- little effort, create "multi-table forms." Multi-table forms are
- a method of combining two or more tables on one data entry form.
- In Paradox, a multi-table form automatically fills in the linking
- fields in the detail table. This means several things:
-
- * Once you have entered a record in the master
- table, all you have to do for new orders is enter
- the new order information. This cuts down on the
- work data entry people must do, and reduces the
- tedium of data entry.
-
- * The possibilities for error are reduced because
- data entry work is reduced.
-
- * All the records for any given customer can be
- viewed on one screen -- without cluttering the
- screen with duplicate name and address
- information.
-
- In Paradox 3.0 and up, multi-table forms are discussed in the
- Paradox Presenting Data Guide.
-
-
-
-
-
-
-
-
-
-
-